<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>分销设置</title>
    {template 'stourtravel/public/public_js'}
    {php echo Common::getCss('style.css,base.css,base_new.css'); }
    {php echo Common::getScript('config.js,ajaxform.js');}
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    <style>
       .ratio-sp{
           float:left;
           line-height: 24px;
           margin-left:3px;
       }
       .hint-sp{
           float:left;
           margin-left:15px;
           line-height: 24px;
           height:24px;
           color:#acacac;
       }
       .ver-item{
           float:left;
           margin-right: 10px;
       }
       .wx-tit{
           width:80px;
           text-align: right;
       }
    </style>
</head>

<body>
	<table class="content-tab">
    <tr>
    <td width="119px" class="content-lt-td"  valign="top">
     {template 'stourtravel/public/leftnav'}
    <!--右侧内容区-->
    </td>
     <td valign="top" class="content-rt-td">
        <!--面包屑-->
         <div class="cfg-header-bar">
             <div class="cfg-header-tab">
                 <span class="item on" data-id="weixin">微信公众号配置{Common::get_help_icon('fenxiao_type_wx')}</span>
                 <span class="item" data-id="wxxcx">微信小程序配置{Common::get_help_icon('fenxiao_type_wxxcx')}</span>
             </div>
             <a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
         </div>
         <form method="post" name="product_frm" id="product_frm">
                     <!--微信公众号配置开始-->
                    <div class="clearfix product-add-div" id="item_weixin">
                        <ul class="info-item-block">
                            <li>
                                <span class="item-hd">APPID：{Common::get_help_icon('weixin_appid')}</span>
                                <div class="item-bd">
                                    <input name="cfg_fenxiao_wx_appid"  type="text" class="input-text w200"  value="{$info['cfg_fenxiao_wx_appid']}"/>
                                    <span class="item-text c-999">*微信公众号APPID</span>
                                </div>
                            </li>
                            <li>
                                <span class="item-hd">APPSECRET：{Common::get_help_icon('weixin_appsecret')}</span>
                                <div class="item-bd">
                                    <input name="cfg_fenxiao_wx_appsecret"  type="text" class="input-text w300"  value="{$info['cfg_fenxiao_wx_appsecret']}"/>
                                    <span class="item-text c-999">*微信公众号APPSECRET</span>
                                </div>
                            </li>

                        </ul>
                        <div class="ml-115">
                            <p class="item-text c-999">请先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”,域名为当前使用微信分享功能的网站域名，例如lvyou.com</p>
                            <p class="c-red">*注意在配置时不能加域名前缀，如www等</p>
                        </div>
                    </div>
                    <!--微信公众号配置结束-->
                    <!--微信小程序配置开始-->
                    <div class="clearfix product-add-div" id="item_wxxcx" style="display: none;">
                         <ul class="info-item-block">
                             <li>
                                 <span class="item-hd">APPID：{Common::get_help_icon('weixin_appid')}</span>
                                 <div class="item-bd">
                                     <input name="cfg_wxxcx_appid"  type="text" class="input-text w200"  value="{$info['cfg_wxxcx_appid']}"/>
                                     <span class="item-text c-999">*AppID(小程序ID)</span>
                                 </div>
                             </li>
                             <li>
                                 <span class="item-hd">APPSECRET：{Common::get_help_icon('weixin_appsecret')}</span>
                                 <div class="item-bd">
                                     <input name="cfg_wxxcx_appsecret"  type="text" class="input-text w300"  value="{$info['cfg_wxxcx_appsecret']}"/>
                                     <span class="item-text c-999">*AppSecret(小程序密钥)</span>
                                 </div>
                             </li>
                         </ul>
                         <div class="ml-115">
                             <p class="item-text c-999">请先登录微信小程序平台进入:开发->开发设置->开发者ID 查看 小程序ID和小程序密钥</p>
                         </div>
                    </div>
                    <!--微信小程序配置结束-->
                    <div class="clear clearfix pt-20 pb-20">
                        <a class="btn btn-primary radius size-L ml-115" id="btn_save" href="javascript:;">保存</a>
                    </div>
                 

             <input type="hidden" name="id" id="rankid" value="1">
         </form>
  </td>
  </tr>
  </table>


  
  
	<script>

	$(document).ready(function(){
        //切换菜单
        $(".cfg-header-tab span").click(function(){
            var id = $(this).attr('data-id');
            $(this).siblings().removeClass('on');
            $(this).addClass('on');

            $(".product-add-div").hide();
            $("#item_"+id).show();
        });
        //配置信息保存
        $("#btn_save").click(function(){
            $.ajaxform({
                url   :  SITEURL+"fenxiao/admin/config/ajax_config_save",
                method  :  "POST",
                isUpload :  true,
                form  : "#product_frm",
                dataType: "JSON",
                success  :  function(data, opts)
                {
                    if(data.status)
                    {
                        ST.Util.showMsg('保存成功!','4',2000);
                    }
                    else
                    {
                        ST.Util.showMsg(data.msg,'5',2000);
                    }
                }
            });
        })
     });
    </script>

</body>
</html>
